Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / androidApp / src / google / kotlin / org / meshtastic / app / di / AppFunctionsModule.kt

Displaying Raw • Download

androidApp/src/google/kotlin/org/meshtastic/app/di/AppFunctionsModule.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 2.05 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app.di

Tff7b72import T7ee787android.content.Context
Tff7b72import T7ee787org.koin.core.annotation.Module
Tff7b72import T7ee787org.koin.core.annotation.Named
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.app.ai.appfunctions.AppFunctionStateSync
Tff7b72import T7ee787org.meshtastic.app.ai.appfunctions.MeshtasticAppFunctions
Tff7b72import T7ee787org.meshtastic.core.data.ai.AiFunctionProvider
Tff7b72import T7ee787org.meshtastic.core.di.CoroutineDispatchers
Tff7b72import T7ee787org.meshtastic.core.repository.AppFunctionsPrefs

T8b949e/** Provides AppFunctions integration for the Google flavor. */
Tf0883e@Module
Tff7b72class T56d364AppFunctionsModule Tb4b4b4{
Tf0883e@Single
Tff7b72fun Td2a8ffmeshtasticAppFunctionsTb4b4b4(Te6edf3providerTb4b4b4: Te6edf3AiFunctionProviderTb4b4b4)Tb4b4b4: Te6edf3MeshtasticAppFunctions Tff7b72= Te6edf3MeshtasticAppFunctionsTb4b4b4(Te6edf3providerTb4b4b4)

T8b949e// NOT createdAtStart: eager creation needs the androidContext binding and spawns the sync
T8b949e// coroutine, which breaks (and is wrong for) any Koin graph built outside a running app —
T8b949e// e.g. KoinVerificationTest's typed-bootstrap check. GoogleMeshUtilApplication starts it
T8b949e// explicitly at app startup instead.
Tf0883e@Single
Tff7b72fun Td2a8ffappFunctionStateSyncTb4b4b4(
Te6edf3contextTb4b4b4: Te6edf3ContextTb4b4b4,
Te6edf3prefsTb4b4b4: Te6edf3AppFunctionsPrefsTb4b4b4,
Te6edf3dispatchersTb4b4b4: Te6edf3CoroutineDispatchersTb4b4b4,
Tb4b4b4)Tb4b4b4: Te6edf3AppFunctionStateSync Tff7b72= Te6edf3AppFunctionStateSyncTb4b4b4(Te6edf3contextTb4b4b4, Te6edf3prefsTb4b4b4, Te6edf3dispatchersTb4b4b4)

Tf0883e@Single
Tf0883e@NamedTb4b4b4(Ta5d6ff"Ta5d6ffgoogleServicesAvailableTa5d6ff"Tb4b4b4)
Tff7b72fun Td2a8ffgoogleServicesAvailableTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean Tff7b72= Tff7b72true
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s